# Cookies_Radius.py # # Description: Draws a chocolate chip cookie with our turtle. # # Anne Lavergne # Date: Feb. 26 2024 # Import the turtle library import turtle # Function to draw a chocolate chip cookie def drawCookie(aX,aY, aRadius): """Draw a chocolate chip cookie.""" # Draw the contour of the cookie tt.penup() tt.goto(aX,aY) tt.pendown() tt.circle(aRadius) tt.penup() return # ***Main part of the program # Creates a graphics window - canvas canvas = turtle.Screen() # Create a turtle named tt tt = turtle.Turtle() # Set radius radius = 30 # Draw 3 cookies for location in [(-140,-120), (100,75), (0,0)]: drawCookie(location[0], location[1], radius) # Click on the canvas to exit canvas.exitonclick()